<template>
	<div class="box" v-if="isShow">
		<div class="isShowBox">
			<div class="topBox">
				<div class="topBoxLeft">{{isShowOrderTime}}s</div>
				<div class="topBoxRight el-icon-close" @click="hidBox()">
				</div>
			</div>
			<img src="../../assets/images/readcard/cardError.png" class="successBox"></img>
			<div class="itemIitle deepHui ">请检查卡片是否插反…</div>
			<!-- <div class="itemIitle hui " v-if="code!='mzyy'&&code!='mzgh'">{{isShowOrderTime}}秒后返回首页</div> -->
			<!-- <div class="itemIitle hui ">{{isShowOrderTime}}秒后返回打印凭条</div> -->
		</div>
		<div class="yiny" @click="hidBox()"></div>
	</div>
</template>

<script>
	export default {
		name: "isShow",
		data() {
			return {
				isShowOrderTime: 60,
				//支付成功时间对象
				mySuccessVal: '',
				isShow: false
			}
		},
		props: {
			money: String,
			title: String
		},
		methods: {
			init() {
				let _this = this;
				_this.isShow = true;
				clearInterval(_this.mySuccessVal);
				_this.mySuccessVal = window.setInterval(() => {
					let dataTime = _this.isShowOrderTime;
					if (dataTime >= 1) {
						dataTime -= 1;
						_this.isShowOrderTime = dataTime;
					} else {
						_this.$router.push('/')
					}
				}, 1000);
			},
			hidBox() {
				this.isShow = false;
				clearInterval(this.mySuccessVal);
			}
		},
		mounted() {},
	}
</script>

<style scoped>
	.box {
		width: 100%;
	}

	.topBox {
		width: 100%;
		height: 50px;
		margin-top: 21px;
		margin-left: 20px;
	}

	.topBoxLeft {
		float: left;
		height: 100%;
		font-size: 32px;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #57A8FF;
	}
	

	.topBoxRight {
		width: 3.125rem;
		height: 3.125rem;
		background: #57A8FF;
		border-radius: 6px;
		position: absolute;
		right: 0px;
		top: 0px;
		color: #FFF0FF;
		font-size: 3.125rem;
	}



	.itemIitle {
		width: 100%;
		text-align: center;
		font-size: 2.3875rem;
		margin-top: 20px;
	}

	.successBox {
		width: 150px;
		height: 139px;
		margin-top: 40px;
	}

	.cardMar {
		margin-top: 40px;
	}

	.yiny {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.5);
		z-index: 2;
	}
</style>
